<?php if (!defined('BASEPATH')) exit('No direct script access allowed'); ?>

<!-- Feature content-->
<div class="wrap-content border">
	<section id="main-feature">
		<!-- new posts -->
		<section id="new-post">
			<h2 class="feature-title"><?php echo lang('ranking.new_posted_connection')?></h2>
			<div class="feature-content">
				<div class="feature-row">
		 			<?php if(!empty($new_post)):?>
				   	<div class="left-pos-feature">
						<h3 class="upper-rank left">
							<a href="javascript:void(0);" onclick="open_POPUP(<?php echo $new_post[0]->id;?>);" >
								<?php echo display( $new_post[0]->name, $max_length_item)."<br />".display( $new_post[0]->dish_name, $max_length_item);?>
							</a>
						</h3>
								
						<p class="upper-rank left"><?php echo display($new_post[0]->details, $max_length_details);?></p>
					</div>
					<div class="right-pos-feature">
						<?php if($new_post[0]->image1):?>
							<img src="<?php echo site_url().'uploads/files/timthumb.php?w=72&h=72&zc=1&src='.site_url().'uploads/files/pictures/'.$new_post[0]->image1; ?>" />
						<?php endif;?>
						<?php if($new_post[0]->image2):?>
							<img src="<?php echo site_url().'uploads/files/timthumb.php?w=72&h=72&zc=1&src='.site_url().'uploads/files/pictures/'.$new_post[0]->image2; ?>" />
						<?php endif;?>
						<?php if($new_post[0]->image3):?>
							<img src="<?php echo site_url().'uploads/files/timthumb.php?w=72&h=72&zc=1&src='.site_url().'uploads/files/pictures/'.$new_post[0]->image3; ?>" />
						<?php endif;?>
					</div>
					<?php endif;?>
				</div>
				<div class="clrboth"></div>


				<div class="feature-sep"></div>


				<div class="clrboth"></div>
				<div class="feature-row" style="border:0;">
					<?php if(!empty($new_post)):?>
				 	<div class="left-pos-feature">
						<h3 class="lower-rank left">
							<a href="javascript:void(0);" onclick="open_POPUP(<?php echo $new_post[1]->id;?>);" >
								<?php echo display($new_post[1]->name, $max_length_item)."<br />".display( $new_post[1]->dish_name, $max_length_item);;?>
							</a>
						</h3>
						<p class="lower-rank left"><?php echo display($new_post[1]->details, $max_length_details );?></p>
					</div>
					<div class="right-pos-feature">
						<?php if($new_post[1]->image1):?>
							<img src="<?php echo site_url().'uploads/files/timthumb.php?w=72&h=72&zc=1&src='.site_url().'uploads/files/pictures/'.$new_post[1]->image1; ?>" />
						<?php endif;?>
						<?php if($new_post[1]->image2):?>
							<img src="<?php echo site_url().'uploads/files/timthumb.php?w=72&h=72&zc=1&src='.site_url().'uploads/files/pictures/'.$new_post[1]->image2; ?>" />
						<?php endif;?>
						<?php if($new_post[1]->image3):?>
							<img src="<?php echo site_url().'uploads/files/timthumb.php?w=72&h=72&zc=1&src='.site_url().'uploads/files/pictures/'.$new_post[1]->image3; ?>" />
						<?php endif;?>
					</div>
					<?php endif;?>
				</div>

			</div>
		</section>
		<!--end new posts -->

		<!--new content -->
		<section id="new-content">
			<h2 class="feature-title"><?php echo lang('ranking.new_arrival_content')?></h2>
			<div class="feature-content">
				<div class="feature-row">
				<?php if(!empty($new_arrival[0])): ?>
				   	<div class="left-pos-feature">
						<h3 class="text left"><a href="javascript:void(0);" onclick="open_POPUP(<?php echo $new_arrival[0]->id;?>);" >
						<?php
							echo  display( $new_arrival[0]->name, $max_length_item)."<br />".display( $new_arrival[0]->dish_name, $max_length_item);
						?>
						</a></h3>
						<p class="text left"><?php echo display($new_arrival[0]->details, $max_length_details);?></p>
					</div>
					<div class="right-pos-feature">
						<?php if($new_arrival[0]->image1):?>
							<img src="<?php echo site_url().'uploads/files/timthumb.php?w=72&h=72&zc=1&src='.site_url().'uploads/files/pictures/'.$new_arrival[0]->image1; ?>" />
						<?php endif;?>
						<?php if($new_arrival[0]->image2):?>
							<img src="<?php echo site_url().'uploads/files/timthumb.php?w=72&h=72&zc=1&src='.site_url().'uploads/files/pictures/'.$new_arrival[0]->image2; ?>" />
						<?php endif;?>
						<?php if($new_arrival[0]->image3):?>
							<img src="<?php echo site_url().'uploads/files/timthumb.php?w=72&h=72&zc=1&src='.site_url().'uploads/files/pictures/'.$new_arrival[0]->image3; ?>" />
						<?php endif;?>
					</div>

				<?php endif; ?>
				</div>
				<div class="clrboth"></div>

				<div class="feature-sep"></div>

				<div class="clrboth"></div>
				<div class="feature-row" style="border:0;">
				<?php if(!empty($new_arrival[1])): ?>
				   	<div class="left-pos-feature">
						<h3 class="text left"><a href="javascript:void(0);" onclick="open_POPUP(<?php echo $new_arrival[1]->id;?>);" >
						<?php
							echo  display( $new_arrival[1]->name,$max_length_item)."<br />".display( $new_arrival[1]->dish_name, $max_length_item);;
						?>
						</a></h3>
						<p class="text left"><?php echo display($new_arrival[1]->details, $max_length_details);?></p>
					</div>
					<div class="right-pos-feature">
						<?php if($new_arrival[1]->image1):?>
							<img src="<?php echo site_url().'uploads/files/timthumb.php?w=72&h=72&zc=1&src='.site_url().'uploads/files/pictures/'.$new_arrival[1]->image1; ?>" />
						<?php endif;?>
						<?php if($new_arrival[1]->image2):?>
							<img src="<?php echo site_url().'uploads/files/timthumb.php?w=72&h=72&zc=1&src='.site_url().'uploads/files/pictures/'.$new_arrival[1]->image2; ?>" />
						<?php endif;?>
						<?php if($new_arrival[1]->image3):?>
							<img src="<?php echo site_url().'uploads/files/timthumb.php?w=72&h=72&zc=1&src='.site_url().'uploads/files/pictures/'.$new_arrival[1]->image3; ?>" />
						<?php endif;?>
					</div>

				<?php endif; ?>
				</div>
			</div>
		</section>
		<!--end new content -->
	</section>
</div>
<div class="clrboth"></div>
<!-- end feature content -->

<div class="wrap-content border" id="sep_black">

</div>
<div class="clrboth"></div>
